package com.im.util;

import java.util.HashMap;
import java.util.Map;

public class ErrorCode {
	//异常信息配置
	//异常类型
	public final static long ERR_SOURCE_DB = 10L; //数据库异常
	public final static long ERR_SOURCE_APPLY = 20L; //20 应用服务异常
	public final static long ERR_SOURCE_FRONT = 30L; //30 前端客户端异常
	
	//异常来源
	public final static long ERR_TYPE_SYS = 10L; //10 系统类
	public final static long ERR_TYPE_APPLY = 20L; //20 受理类
	public final static long ERR_TYPE_QUERY = 30L; //30 查询类
	public final static long ERR_TYPE_INTERFACE = 40L; //40 接口类
	
	//异常编码预留位
	public final static long ERR_CODE_PREINDEX = 0L; //异常编码预留位
	
	//异常编码
	public final static long ERRCODE_CHECK_ACCTNUM = 0001L;//校验账号
	
	
	//数据库异常编码
	public final static Map<String,Long> EXCEPTION_DB = new HashMap<String,Long>();
	static{
		//受理类
		EXCEPTION_DB.put("addCustInfo",1020001L);//客户基本信息维护
		//系统类
		//受理类
		//查询类
		//接口类
		//积分类
	}

	
	
	//应用服务异常编码
	public final static Map<String,Long> EXCEPTION_SYS = new HashMap<String,Long>();
	static{
		//系统类
		EXCEPTION_SYS.put("checkAcctNum",902010003L);//账号校验
		EXCEPTION_SYS.put("checkPhoneNum",902010004L);//手机号码校验
		EXCEPTION_SYS.put("checkInviteCode",902010005L);//邀请码校验
		EXCEPTION_SYS.put("login",902010001L);//客户登录
		EXCEPTION_SYS.put("register",902010002L);//客户注册
		//受理类
		//1、客户域
		EXCEPTION_SYS.put("addCust",102020001L);//客户基本信息维护
		EXCEPTION_SYS.put("addCustRela",102020002L);//客户关系信息维护
		EXCEPTION_SYS.put("addCustBinding",102020003L);//客户绑定信息维护
		EXCEPTION_SYS.put("addCustIdentify",102020004L);//客户证件信息维护
		EXCEPTION_SYS.put("addTcmCustAttr",102020005L);//客户属性维护
		EXCEPTION_SYS.put("addCustRang",102020006L);//客户维度信息维护
		EXCEPTION_SYS.put("addTcmCustAttrExtend",102020007L);//客户属性扩展维护
		EXCEPTION_SYS.put("addCustMailAddress",102020008L);//邮寄地址管理
		EXCEPTION_SYS.put("saveOrUpdateAuditMessage",102020009L);//审批新增或修改
		EXCEPTION_SYS.put("addCustDemand",102020010L);//客户发布询盘信息
		EXCEPTION_SYS.put("addCoopBusiBidding",102020011L);//商家竞价
		EXCEPTION_SYS.put("addTsmNotice",102020012L);//公告维护
		EXCEPTION_SYS.put("addTsmForumPost",102020013L);//论坛发帖维护
		EXCEPTION_SYS.put("addTsmForumReply",102020014L);//论坛回帖维护
		EXCEPTION_SYS.put("addTsmComment",102020015L);//评论维护
		EXCEPTION_SYS.put("addTsmCommentReply",102020016L);//评论回复维护
		EXCEPTION_SYS.put("addTsmMessage",102020017L);//留言信息维护
		EXCEPTION_SYS.put("addTsmActive",102020018L);//活动信息维护
		EXCEPTION_SYS.put("addTcmCust2Active",102020019L);//活动报名维护
		
		//2、账户域
		EXCEPTION_SYS.put("addAcct",202020001L);//账户新增
		EXCEPTION_SYS.put("addSubAcct",202020002L);//活动报名维护
		EXCEPTION_SYS.put("addSubAcctChange",202020003L);//活动报名维护
		EXCEPTION_SYS.put("addAcctGuarantee",202020004L);//活动报名维护、
		EXCEPTION_SYS.put("addAcctBonusAmountChg",202020004L);//活动报名维护
		EXCEPTION_SYS.put("addAcct2his",202020004L);//活动报名维护
		
		
		//3、产品域
		
		//4、订单域
		EXCEPTION_SYS.put("orderSubmit2App",402020020L);//订单提交
		EXCEPTION_SYS.put("updateOrderListPayed",402020021L);//订单建档
		EXCEPTION_SYS.put("orderConfirmation",402020022L);//订单确认
		EXCEPTION_SYS.put("addTomCustScore",402020023L);//订单评价信息保存
		
		//5、积分域
		//6、系统域
		//7、物品域
		
		//查询类
		EXCEPTION_SYS.put("queryCustDetail",2030001L);//查询客户资料详情
		EXCEPTION_SYS.put("queryCustInfo",2030002L);//客户基本信息查询
		EXCEPTION_SYS.put("queryStaffInfo",2030003L);//商家员工信息查询
		EXCEPTION_SYS.put("queryCustRela",2030004L);//客户关系信息查询
		EXCEPTION_SYS.put("queryCustIdentify",2030005L);//客户证件信息查询
		EXCEPTION_SYS.put("queryCustAttrInst",2030006L);//客户属性实例信息查询
		EXCEPTION_SYS.put("queryServiceGrade",2030007L);//客户服务等级查询
		EXCEPTION_SYS.put("queryCustRang",2030008L);//客户维度查询
		EXCEPTION_SYS.put("qryCustAttrExt",2030009L);//客户扩展属性实例查询
		EXCEPTION_SYS.put("queryCustMailAddress",2030010L);//邮寄地址查询
		EXCEPTION_SYS.put("qryInquiryInfoList",2030011L);//查询询盘信息
		EXCEPTION_SYS.put("queryCoopBusiBidding",2030012L);//商家竞价查询
		EXCEPTION_SYS.put("queryTsmNotice",2030013L);//公告查询
		EXCEPTION_SYS.put("queryTsmForumPost",2030014L);//论坛查询
		EXCEPTION_SYS.put("queryTsmForumReply",2030015L);//论坛回帖查询
		EXCEPTION_SYS.put("queryComment",2030016L);//评论查询
		EXCEPTION_SYS.put("queryTsmCommentReply",2030017L);//评论回复查询
		EXCEPTION_SYS.put("queryTsmMessage",2030018L);//留言查询
		EXCEPTION_SYS.put("queryTsmActive",2030019L);//活动查询
		EXCEPTION_SYS.put("queryTcmCust2Active",2030020L);//会员参与活动查询
		EXCEPTION_SYS.put("queryCustRangAttr",2030021L);//客户维度属性实例查询
		EXCEPTION_SYS.put("queryIndustryAttr",2030022L);//客户行业属性实例查询
		
	}
}
